package com.example.bookmapper.controller;

import com.example.bookmapper.pojo.CategoryCountAnalysis;
import com.example.bookmapper.service.CategoryCountAnalysisService;
import com.example.bookmapper.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CategoryCountAnalysisController {
    @Autowired
    private CategoryCountAnalysisService categoryCountAnalysisService;

    @GetMapping("/queryAllCategoryCountAnalysis")
    public ResponseResult<List<CategoryCountAnalysis>> queryAllCategoryCountAnalysis() {
        List<CategoryCountAnalysis> categoryCountAnalyses = categoryCountAnalysisService.queryAllCategoryCountAnalysis();
        return new ResponseResult<>("200", "查询成功", categoryCountAnalyses);
    }
}

